package model

import "gorm.io/gorm"

type News struct {
	gorm.Model
	Title   string `gorm:"type:varchar(50)" json:"Title"`
	Content string `gorm:"type:varchar(50)" json:"Content"`
	Author  string `gorm:"type:varchar(30)" json:"Author"`
}

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)" json:"Username"`
	Password string `gorm:"type:varchar(50)" json:"Password"`
}
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int(11)"` //用户id
	Rid int `gorm:"type:int(11)"` //角色id
}

type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(50)"`
}
type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int(11)"` //角色id
	Nid int `gorm:"type:int(11)"` //权限id
}
type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}
